using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Cmc.Modbus.Base
{
  public  class AddressWriteValue
    {

        public AddressWriteValue(int address,int writeValue, int? position = null)
        {
            Address = address;
            Position = position;
            WriteValue = writeValue;
        }
 
        public int Address { get; set; } 

         /// <summary>
         /// 为空不按地址操作
         /// </summary>
         public  int?  Position { get; set; }

         public int WriteValue { get; set; }

         public bool WriteValueBool
         {
             get
             {
                 return WriteValue > 0;
             }
         }
    }
}
